.demo2-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: Arial, sans-serif;
}

.demo2-title {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
}

.demo2-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

.demo2-tab {
  padding: 10px 20px;
  margin: 0 10px;
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
}

.demo2-tab:hover {
  background-color: #f0f0f0;
}

.demo2-tab.active {
  background-color: #4caf50;
  color: white;
}

.demo2-section {
  margin-bottom: 40px;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f9f9f9;
}

.demo2-description {
  color: #666;
  margin-bottom: 15px;
}

.demo2-example {
  padding: 15px;
  background-color: white;
  border-radius: 4px;
  border: 1px solid #eee;
}

/* 高级计数器样式 */
.advanced-counter {
  text-align: center;
  padding: 20px;
}

.counter-display {
  font-size: 48px;
  font-weight: bold;
  color: #2196f3;
  margin: 20px 0;
}

.counter-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.counter-button {
  padding: 10px 20px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.counter-button:hover {
  background-color: #45a049;
}

.counter-button.reset {
  background-color: #f44336;
}

.counter-button.reset:hover {
  background-color: #d32f2f;
}

.step-control {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.step-control label {
  margin-right: 10px;
}

.step-control input {
  width: 60px;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.counter-history {
  max-height: 150px;
  overflow-y: auto;
  margin-top: 20px;
  padding: 10px;
  background-color: #f5f5f5;
  border-radius: 4px;
  text-align: left;
}

.counter-history h3 {
  margin-top: 0;
  font-size: 16px;
  color: #333;
}

.counter-history ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.counter-history li {
  padding: 5px 0;
  border-bottom: 1px solid #eee;
  color: #666;
}

/* 简易 Todo 应用样式 */
.simple-todo {
  padding: 20px;
}

.todo-form {
  display: flex;
  margin-bottom: 20px;
}

.todo-input {
  flex-grow: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  font-size: 16px;
}

.todo-add-button {
  padding: 10px 20px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 16px;
}

.todo-add-button:hover {
  background-color: #45a049;
}

.todo-list {
  list-style-type: none;
  padding: 0;
}

.todo-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.todo-checkbox {
  margin-right: 10px;
  transform: scale(1.2);
}

.todo-text {
  flex-grow: 1;
  margin: 0;
  transition: all 0.3s;
}

.todo-text.completed {
  text-decoration: line-through;
  color: #999;
}

.todo-delete {
  background: none;
  border: none;
  color: #f44336;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.3s;
}

.todo-delete:hover {
  color: #d32f2f;
  transform: scale(1.1);
}

.todo-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding: 10px;
  background-color: #f5f5f5;
  border-radius: 4px;
}

.todo-stats p {
  margin: 0;
  color: #666;
}

.todo-filters {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.todo-filter {
  padding: 5px 15px;
  margin: 0 5px;
  background: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.todo-filter:hover {
  background-color: #f0f0f0;
}

.todo-filter.active {
  background-color: #2196f3;
  color: white;
  border-color: #2196f3;
} 